﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package ZLocalization {

    public class LocalizerSWF extends Localizer {

        public function LocalizerSWF(_arg1:Object){
            super(_arg1);
            this.m_locale = _arg1.info.locale;
            this.m_cached = _arg1.text;
            this.setSubstituter();
        }
        override public function getString(_arg1:String, _arg2:String):LocalizedString{
            var _local3:Object;
            var _local4:String;
            var _local5:Object;
            var _local6:LocalizedString;
            if (((this.m_cached.hasOwnProperty(_arg1)) && (this.m_cached[_arg1].hasOwnProperty(_arg2)))){
                if ((this.m_cached[_arg1][_arg2] is LocalizedString)){
                    return (this.m_cached[_arg1][_arg2]);
                };
                _local3 = this.m_cached[_arg1][_arg2];
                _local4 = _local3["original"];
                _local5 = (_local3.hasOwnProperty("variations")) ? _local3["variations"] : null;
                _local6 = new LocalizedString(_local4, _local5);
                if (_local3.hasOwnProperty("gender")){
                    _local6.gender = _local3["gender"];
                };
                this.m_cached[_arg1][_arg2] = _local6;
                return (_local6);
            };
            return (null);
        }

    }
}//package ZLocalization 
